<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Playbook - ScenarioProvider</title>
    <link rel="stylesheet" type="text/css" href="https://playbook-ui.github.io/playbook-ios/all.css" media="all" />
</head>
<body>
    <header>
        <a href="https://playbook-ui.github.io/playbook-ios">
            <strong>
                Playbook
            </strong>
            <span>Documentation</span>
        </a>
    </header>

    <!--
    <form class="search">
        <input type="search" placeholder="Search" />
    </form>
    -->

    <nav>
        <div class="wrapper">
            <h2>On This Page</h2>
            <ol><li><a href="#requirements">Requirements</a><ul><li class="function"><a href="#scenarioprovider.addscenarios(into:)">add​Scenarios(into:​)</a></li></ul></li></ol>
        </div>
    </nav>

    <main>
        <article>
            <h1>
    <small>Protocol</small>
    <code class="name">Scenario​Provider</code>
</h1>

<div class="declaration">
<pre class="highlight"><code><html><body><span class="keyword">public</span> <span class="keyword">protocol</span> <span class="type">ScenarioProvider</span>  </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>Products a group of separated scenario definitions.</p>

</div>
<div class="discussion">
    <html><body><pre class="highlight"><code><span class="keyword">struct</span> <span class="type">UserScenarios</span>: <span class="type">ScenarioProvider</span> {
    <span class="keyword">static</span> <span class="keyword">func</span> <span class="function">addScenarios</span>(<span class="variable">into</span> <span class="variable">playbook</span>: <a href="https://playbook-ui.github.io/playbook-ios/Playbook"><span class="type">Playbook</span></a>) {
        <span class="variable">playbook</span>.<span class="variable">addScenarios</span>(<span class="variable">of</span>: <span class="string literal">"</span><span class="string literal">User</span><span class="string literal">"</span>) {
            <span class="variable">Scenario</span>(<span class="string literal">"</span><span class="string literal">signed in</span><span class="string literal">"</span>, <span class="variable">layout</span>: .<span class="variable">compressed</span>) {
                <span class="variable">UserView</span>(<span class="variable">name</span>: <span class="string literal">"</span><span class="string literal">John</span><span class="string literal">"</span>, <span class="variable">isSignedIn</span>: <span class="keyword">true</span>)
            }

            <span class="variable">Scenario</span>(<span class="string literal">"</span><span class="string literal">signed out</span><span class="string literal">"</span>, <span class="variable">layout</span>: .<span class="variable">compressed</span>) {
                <span class="variable">UserView</span>(<span class="variable">name</span>: <span class="string literal">"</span><span class="string literal">Jane</span><span class="string literal">"</span>, <span class="variable">isSignedIn</span>: <span class="keyword">false</span>)
            }
        }
    }
}
</code></pre></body></html>
</div>




    <section id="requirements">
        <h2>Requirements</h2>

        <div role="article" class="function" id="scenarioprovider.addscenarios(into:)">
    <h3>
        <code>add​Scenarios(into:​)</code>
    </h3>
    <div class="declaration">
<pre class="highlight"><code><html><body><span class="keyword">static</span> <span class="keyword">func</span> <span class="function">addScenarios</span>(<span class="variable">into</span> <span class="variable">playbook</span>: <a href="https://playbook-ui.github.io/playbook-ios/Playbook"><span class="type">Playbook</span></a>) </body></html></code></pre>
</div>
<div class="summary" role="doc-abstract">
    <p>The function to defines a group of scenarios.</p>

</div>
<h4>Parameters</h4>

<table class="parameters">
  <thead hidden>
  <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
  </tr>
  </thead>
  <tbody>
    <tr>
    <th>playbook</th>
    <td><code class="type">Playbook</code></td>
    <td><p>A <code>Playbook</code> instance to be added the scenarios.</p>
</td>
</tr>
  </tbody>
</table>
</div>
    </section>
        </article>
    </main>

    <footer>
        <p>
    Generated on <time datetime="2021-08-25T19:01:53+0900">August 25, 2021</time> using <a href="https://github.com/SwiftDocOrg/swift-doc">swift-doc</a> <span class="version">1.0.0-rc.1</span>.
</p>
    </footer>
</body>
</html>
